﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SysClass.aspx.cs" Inherits="Manager_SysClass" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>
    <style type="text/css">
        .x-grid3-row-body .expander
        {
            padding-left: 30px;
            padding-top: 5px;
            padding-bottom: 5px;
        }
        .x-grid3-row-body .expander p
        {
            padding-left: 30px;
            padding-top: 5px;
            padding-bottom: 5px;
        }
        .x-grid3-row-body .expander strong
        {
            font-weight: bold;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <ext:PageManager ID="PageManager1" runat="server" AjaxLoadingType="mask" AutoSizePanelID="gridList" />
    <ext:Grid ID="gridList" runat="server" AutoScroll="true" EmptyText="暂时没有相关数据!" RowNumberWidth="40px"
        ShowBorder="true" EnableRowNumber="true" DataKeyNames="CId" ShowHeader="false"
        BodyPadding="0" ForceFitAllTime="true" AllowPaging="true" PageSize="50" EnableCheckBoxSelect="true"
        OnRowCommand="gridList_RowCommand" OnRowDataBound="gridList_RowDataBound">
        <Columns>
            <ext:TemplateField ID="tfExpander" runat="server" RenderAsRowExpander="true">
                <ItemTemplate>
                    <div class="expander">
                        <p>
                            <strong>优化关键词：</strong><%# Eval("CKeywords")%></p>
                        <p>
                            <strong>优化描述：</strong><%# Eval("CDescription")%></p>
                        <p>
                            <strong>备注信息：</strong><%# HttpUtility.HtmlDecode(Convert.ToString(Eval("CNote")))%></p>
                        <p>
                            <asp:Image ID="imgClass" runat="server" ImageUrl='<%# Eval("CPic") %>' Height="40" /></p>
                    </div>
                </ItemTemplate>
            </ext:TemplateField>
            <ext:BoundField DataField="CName" DataSimulateTreeLevelField="cLevel" DataFormatString="{0}"
                HeaderText="类别名" ExpandUnusedSpace="True" />
            <ext:TemplateField ID="tfUpClassName" runat="server" HeaderText="父类别">
                <ItemTemplate>
                    <asp:Label ID="lblShowUpClassName" runat="server" Text='<%# Eval("CUpId") %>'></asp:Label>
                </ItemTemplate>
            </ext:TemplateField>
            <ext:CheckBoxField ID="cboxStatus1" DataField="CStatus" runat="server" HeaderText="状态" />
            <ext:LinkButtonField ID="lbfDelete" runat="server" Icon="delete" ConfirmText="确定删除？"
                CommandName="Delete" TextAlign="center" Width="40" />
        </Columns>
        <Toolbars>
            <ext:Toolbar ID="Toolbar1" runat="server" Position="top">
                <Items>
                    <ext:ToolbarText ID="ToolbarText1" runat="server" Text="类别列表">
                    </ext:ToolbarText>
                    <ext:Button ID="btnCNVer" runat="server" Text="中文版" OnClick="btnCNVer_Click" Visible="false">
                    </ext:Button>
                    <ext:Button ID="btnENVer" runat="server" Text="英文版" OnClick="btnENVer_Click" Visible="false">
                    </ext:Button>
                    <ext:ToolbarFill ID="ToolbarFill1" runat="server">
                    </ext:ToolbarFill>
                    <ext:Button ID="btnAdd" runat="server" Text="新增（编辑）类别" Icon="add" OnClick="btnAdd_Click">
                    </ext:Button>
                    <ext:Button ID="btnDelete" runat="server" Text="删除选中" Icon="delete" OnClick="btnDelete_Click">
                    </ext:Button>
                </Items>
            </ext:Toolbar>
        </Toolbars>
        <PageItems>
            <ext:Button ID="btnRefresh" runat="server" Icon="arrowrefresh" OnClick="btnRefresh_Click">
            </ext:Button>
            <ext:ToolbarFill ID="ToolbarFill3" runat="server">
            </ext:ToolbarFill>
            <ext:ToolbarSeparator ID="ToolbarSeparator2" runat="server">
            </ext:ToolbarSeparator>
            <ext:ToolbarText ID="ToolbarText2" runat="server" Text="每页记录数：">
            </ext:ToolbarText>
            <ext:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
                OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
                <ext:ListItem Text="15" Value="15" />
                <ext:ListItem Text="20" Value="20" />
                <ext:ListItem Text="25" Value="25" Selected="true" />
            </ext:DropDownList>
        </PageItems>
    </ext:Grid>
    <ext:Window ID="winForm" runat="server" Title="新增（编辑）类别" Popup="false" EnableCollapse="true"
        IsModal="true" Width="480" CloseAction="hideRefresh">
        <Items>
            <ext:SimpleForm ID="sfObject" runat="server" ShowHeader="false" BodyPadding="5px"
                LabelAlign="right" FooterBarAlign="center">
                <Items>
                    <ext:HiddenField ID="hfClassId" runat="server">
                    </ext:HiddenField>
                    <ext:DropDownList ID="ddlUpClass" runat="server" Label="上级类别" Required="true" EnableSimulateTree="true">
                        <ext:ListItem Text="顶级菜单" Value="0" />
                    </ext:DropDownList>
                    <ext:TextBox ID="txtClassName" runat="server" Label="类别名称" Required="true">
                    </ext:TextBox>
                    <ext:FileUpload ID="fuImage" runat="server" Label="类别略图">
                    </ext:FileUpload>
                    <ext:FileUpload ID="fuBgImage" runat="server" Label="类别背景图">
                    </ext:FileUpload>
                    <ext:TextArea ID="txtNotes" runat="server" Label="备注信息" Height="40">
                    </ext:TextArea>
                    <ext:TextArea ID="txtKeywords" runat="server" Label="优化站点关键词" Height="40">
                    </ext:TextArea>
                    <ext:TextArea ID="txtDescription" runat="server" Label="优化站点描述" Height="40">
                    </ext:TextArea>
                    <ext:TextBox ID="txtOrder" runat="server" Label="排序" Required="true" Text="99">
                    </ext:TextBox>
                    <ext:CheckBox ID="cboxStatus" runat="server" Label="状态" Text="启用/禁用" Checked="true">
                    </ext:CheckBox>
                </Items>
                <Toolbars>
                    <ext:Toolbar ID="Toolbar2" runat="server" Position="footer">
                        <Items>
                            <ext:Button ID="btnSubmit" runat="server" Text="资料保存" Icon="systemsave" ValidateForms="sfObject"
                                OnClick="btnSubmit_Click">
                            </ext:Button>
                            <ext:Button ID="btnReset" runat="server" Text="重 置" Icon="reload">
                            </ext:Button>
                        </Items>
                    </ext:Toolbar>
                </Toolbars>
            </ext:SimpleForm>
        </Items>
    </ext:Window>
    </form>
</body>
</html>
